Repository navigation
Conversation
By default, XMLHttpRequests do not time out. A developer might want to react to errors by redirecting to an error page, which was only possible by listening for ravenSuccess and ravenFailure events. In case of network issues or Sentry being overloaded, error reporting requests may take a very long time. The newly introduced ravenTimeout event is triggered once a user-defined timeout has aborted the request.
|
👍 |
|
We've started using Raven.js with this change in production. So far, we haven't found any problems with thousands of users having come in contact with it. |
| typeof XDomainRequest !== 'undefined'; | ||
|
|
||
| return (hasCORS ? this._makeXhrRequest : this._makeImageRequest)(opts); | ||
| return (hasCORS ? this._makeXhrRequest : this._makeImageRequest).call(this, opts); |
|
@howard – Hey, thanks for submitting this. My only comment is that I'm retiring the current DOM-based event system, which is undocumented, for the event system described in #524 (and implemented in #521). This event system will get rolled out in Raven 3.0. I'd rather keep it undocumented until that time. |
|
Is it possible to look into merging this? Upgrading to 3.0 may take some time, especially for some of the projects I and others are relying on Raven for. My current approach will be to use a static copy of raven.js with the change included here, but I would like to be able to rely on the package. Thanks for the consideration! Happy to discuss or contribute if it helps. |
|
@jamiecounsell – the blocker here is the new I don't want to introduce new events because the existing events are not usable by React Native, and the API will definitely change. |
|
@benvinegar thanks for the prompt response. I will look into this! |
|
This PR is outdated, therefore I'll close it for now. @howard @jamiecounsell, if you'd like to work on updating it, please let me know. I created #1033 to track this feature. |
By default, XMLHttpRequests do not time out. A developer might want to react to
errors by redirecting to an error page, which was only possible by listening
for ravenSuccess and ravenFailure events.
In case of network issues or Sentry being overloaded, error reporting requests
may take a very long time. The newly introduced ravenTimeout event is triggered
once a user-defined timeout has aborted the request.